package com.ww.disruptor.handler;

import com.lmax.disruptor.EventHandler;
import com.ww.disruptor.event.Trade;

import java.util.concurrent.TimeUnit;

/**
 * TODO
 *
 * @author wanggw
 * @date 2024-09-14 23:37:45
 */
public class Handler1 implements EventHandler<Trade> {

    @Override
    public void onEvent(Trade trade, long l, boolean b) throws Exception {
        System.out.println("handler1");
        trade.setName("H1");
        TimeUnit.SECONDS.sleep(1);
    }
}
